using System;
using System.Collections.Generic;

namespace B.S.XZYData.Api.Read.Dto.Route
{
    /// <summary>
    /// 工艺路线详情DTO（包含工序列表）
    /// </summary>
    public class RouteDetailDto
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 工艺路线编号
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 工艺路线名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 开启审批
        /// </summary>
        public bool EnableApproval { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 工序列表
        /// </summary>
        public List<RouteStepDto> Steps { get; set; } = new List<RouteStepDto>();
    }

    /// <summary>
    /// 工艺路线工序DTO
    /// </summary>
    public class RouteStepDto
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 所属路线ID（对应Process表的RoutdId）
        /// </summary>
        public int RouteId { get; set; }

        /// <summary>
        /// 工序编号（对应Process表的ProcessNumber）
        /// </summary>
        public string ProcessCode { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        public string ProcessName { get; set; }

        /// <summary>
        /// 报工配比（对应Process表的ReportingRatio）
        /// </summary>
        public int? Ratio { get; set; }

        /// <summary>
        /// 报工权限（对应Process表的ReportingPermissions）
        /// </summary>
        public string? ReportingPermissions { get; set; }

        /// <summary>
        /// 不良品项列表（对应Process表的DefectiveItemList）
        /// </summary>
        public string? DefectiveItemList { get; set; }

        /// <summary>
        /// 测试字段1（对应Process表的TestField1）
        /// </summary>
        public string? TestField1 { get; set; }

        /// <summary>
        /// 测试字段2（对应Process表的TestField2）
        /// </summary>
        public string? TestField2 { get; set; }

        /// <summary>
        /// 创建时间（对应Process表的CreatorDate）
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改时间（对应Process表的UpdatorDate）
        /// </summary>
        public DateTime? UpdateTime { get; set; }
    }
} 